package org.tacticalTroopers.jme.server.object;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.tacticalTroopers.jme.server.IdManager;

public class ElementFactory {

	enum ElementEnum {PLAYER,BULLET,WALL};

	final static Log log = LogFactory.getLog(ElementFactory.class);
	static ElementFactory soleInstance = new ElementFactory();
	IdManager idManager;
	private ElementFactory (){
		idManager = new IdManager();
	};

	public static ElementFactory getInstance(){
		return soleInstance;
	}

	public ServerWall createWall(){
		ServerWall w = new ServerWall();
		w.setId(idManager.getNextId());
		return w;
	}

	public ServerPlayer creatPlayer(){
		ServerPlayer p = new ServerPlayer();
		p.setId(idManager.getNextId());
		return p;
	}

	public ServerBullet createBullet(){
		ServerBullet b = new ServerBullet();
		b.setId(idManager.getNextId());
		return b;
	}
	
	public ServerElement createElement(){
		ServerElement b = new ServerElement();
		b.setId(idManager.getNextId());
		return b;
	}


}
